﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Abp.Configuration.Startup;
using Abp.Localization.Dictionaries;
using Abp.Localization.Dictionaries.Json;

namespace GCT.Foundation.Localization
{

    public static class FoundationTemplateLocalizationConfigurer
    {
        public static void AddFoundationTemplateLocalization(this ILocalizationConfiguration localizationConfiguration)
        {
            localizationConfiguration.Sources.Add(new DictionaryBasedLocalizationSource(
                FoundationTemplateConfigs.Localization.SourceName,
                new JsonEmbeddedFileLocalizationDictionaryProvider(
                    typeof(FoundationTemplateLocalizationConfigurer).Assembly,
                    $"{typeof(FoundationTemplateLocalizationConfigurer).Namespace}.SourceFiles"
                )
            ));
        }
    }
}
